<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Title</title>
</head>
<style>
    @media only screen and (max-width: 374px) {
        /*iphone5及以下*/
        html {
            font-size: 86px;
        }
    }

    @media only screen and (min-width: 375px) and (max-width: 413px) {
        /*iphone6-8+x*/
        html {
            font-size: 100px;
        }
    }

    @media only screen and (min-width: 414px) {
        /*iphone6p及更大*/
        html {
            font-size: 110px;
        }
    }

    body {
        font-size: .16rem;
    }

    #div1 {
        width: 1rem;
        background: rebeccapurple;
    }
</style>
<body>
<div id="div1">div</div>
</body>
</html>